GARFO summaries
Summaries
Totals by state
Total by license category
Landings by state
License categories by state
Maine
New Hampshire
Massachusetts
Connecticut
Rhode Island
New York
New Jersey
Delaware
Maryland
Virginia
North Carolina
Unique license types per year
Averages
Average number of licenses per vessel over time
Average number of vessels registered in each state over time
Proportion of holdings by license group
It appears that the majority of license holdings report their principal port state as Massachusetts.
Z-score
# totals of license categories issued per year per state
garfo_holdings %>%
group_by(PPST, AP_YEAR, category) %>%
summarise(count = sum(COUNT)) -> total
# by state
total %>%
group_by(PPST) %>% # grouped counts by state (i.e. all licenses issued in Connecticut)
mutate(z_score = scale(count, center = T, scale = T)) -> z_by_state # calculate z-score across all license categories for each state
ggplot(z_by_state) +
geom_line(aes(x = AP_YEAR, y = z_score, color = category)) +
scale_color_gmri() +
facet_wrap(~PPST, ncol = 4) +
ylim(c(-8,8)) +
theme_gmri(strip.background = element_rect(fill = "transparent"),
strip.text = element_text(color = "black"))# by species
total %>%
group_by(category) %>% # grouped counts by category (i.e. all multispecies permits issued in GARFO jusridiction)
mutate(z_score = scale(count, center = T, scale = T)) -> z_by_category # calculate z-score across all states for each license category
ggplot(z_by_category) +
geom_line(aes(x = AP_YEAR, y = z_score, color = PPST)) +
scale_color_gmri() +
facet_wrap(~category, ncol = 3) +
ylim(c(-8,8)) +
theme_gmri(strip.background = element_rect(fill = "transparent"),
strip.text = element_text(color = "black"))# manual calculation for comparison (x - xmean / sd)
calc_z <- function(x, x_mean, sd){
return((x-x_mean)/sd)
}
# by state
total %>%
group_by(PPST) %>%
mutate(z_score_manual = calc_z(count,
mean(count),
sd(count))) -> manual_state
manual_state %>%
left_join(z_by_state) # -> z_by_state# A tibble: 4,852 × 6
# Groups: PPST [11]
PPST AP_YEAR category count z_score_manual z_score[,1]
<chr> <int> <chr> <int> <dbl> <dbl>
1 CT 1996 Lobster 46 0.0346 0.0346
2 CT 1996 Multispecies 110 2.23 2.23
3 CT 1996 Quahog 8 -1.27 -1.27
4 CT 1996 Scallop 22 -0.790 -0.790
5 CT 1996 Sea scallop 5 -1.37 -1.37
6 CT 1996 Squid/Mackerel/Butterfish 73 0.963 0.963
7 CT 1996 Summer flounder 57 0.413 0.413
8 CT 1996 Surf clam 10 -1.20 -1.20
9 CT 1997 Black sea bass 27 -0.618 -0.618
10 CT 1997 Lobster 46 0.0346 0.0346
# ℹ 4,842 more rows
# by category
total %>%
group_by(category) %>%
mutate(z_score_manual = calc_z(count,
mean(count),
sd(count))) -> manual_category
manual_category %>%
left_join(z_by_category) # -> z_by_category# A tibble: 4,852 × 6
# Groups: category [18]
PPST AP_YEAR category count z_score_manual z_score[,1]
<chr> <int> <chr> <int> <dbl> <dbl>
1 CT 1996 Lobster 46 -0.577 -0.577
2 CT 1996 Multispecies 110 -0.602 -0.602
3 CT 1996 Quahog 8 -0.611 -0.611
4 CT 1996 Scallop 22 -0.531 -0.531
5 CT 1996 Sea scallop 5 -0.777 -0.777
6 CT 1996 Squid/Mackerel/Butterfish 73 -0.765 -0.765
7 CT 1996 Summer flounder 57 -0.668 -0.668
8 CT 1996 Surf clam 10 -0.556 -0.556
9 CT 1997 Black sea bass 27 -0.979 -0.979
10 CT 1997 Lobster 46 -0.577 -0.577
# ℹ 4,842 more rows